// 还款表
import request from '@/utils/request'

// 查询还款列表
export function findAll(query) {
    return request({
      url: '/credit/refund/findAll',
      method: 'get',
      params: query
    })
  }

  //根据ID查邮箱
  export function checkEmailByUserId(data) {
    return request({
      url: '/credit/refund/checkEmailByUserId/'+data,
      method: 'get',
    })
  }

    //发邮件，还钱
    export function sendEmail(data) {
      return request({
        url: '/credit/refund/sendEmail/',
        method: 'post',
        data:data
      })
    }


// 单次还款
export function rAffirmPay(userid,orderid) {
    return request({
      url: '/credit/refund/affirmPay/'+userid+"/"+orderid,
      method: 'get'
    })
  }

  // 一次性还款
  export function disAffirmPay(orderid) {
    return request({
      url: '/credit/refund/disAffirmPay/'+orderid,
      method: 'get'
    })
  }